<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<meta name="viewport"
	content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description"
	content="碳氢知识平台由碳三氢二个人创建，属于免费开放的知识浏览平台。该平台主要用于学习Java相关的知识。">
<meta name="keywords"
	content="碳氢知识,碳三氢二,tansanqinger,tanqingzhishi,C3H2,c3h2,碳十八氢十二,碳三,tansan,C18H12">
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="spm_prefix" content="333.851">
<link rel="icon" href="/img/index.ico" />
<link rel="shortcut icon" href="/img/index.ico" />
<meta charset="UTF-8" name="viewport"
	content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="/layui/css/layui.css">
<link rel="stylesheet" href="https://demo.easyweb.vip/iframe/assets/module/admin.css?v=318"/>
<script src="/layui/layui.js"></script>

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.5.0/dist/css/bootstrap.min.css" integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.5.0/dist/js/bootstrap.min.js" integrity="sha384-OgVRvuATP1z7JjHLkuOU7Xw704+h835Lr+6QL9UvYjZE3Ipu6Tp75j7Bh/kR0JKI" crossorigin="anonymous"></script>
<script src="http://libs.baidu.com/jquery/2.0.0/jquery.js"></script>
<script type="text/javascript" src="https://demo.easyweb.vip/iframe/assets/js/common.js?v=318"></script>
<title>碳氢知识</title>
<style type="text/css">
*{margin:0px auto;padding:0px auto;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}
body,html{background-color:#F5F5F5; width: 100%; height: 100%;min-width: 1280px;min-height: 800px;-webkit-box-align: center;-webkit-align-items: center;-ms-flex-align: center;align-items: center;-webkit-box-pack: center;-webkit-justify-content: center;-ms-flex-pack: center;justify-content: center;}
.paddingRightLeft0{padding-right:0px;padding-left: 0px;}
.col, .col-1, .col-10, .col-11, .col-12, .col-2, .col-3, .col-4, .col-5, .col-6, .col-7, .col-8, .col-9, .col-auto, .col-lg, .col-lg-1, .col-lg-10, .col-lg-11, .col-lg-12, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-auto, .col-md, .col-md-1, .col-md-10, .col-md-11, .col-md-12, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-auto, .col-sm, .col-sm-1, .col-sm-10, .col-sm-11, .col-sm-12, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-auto, .col-xl, .col-xl-1, .col-xl-10, .col-xl-11, .col-xl-12, .col-xl-2, .col-xl-3, .col-xl-4, .col-xl-5, .col-xl-6, .col-xl-7, .col-xl-8, .col-xl-9, .col-xl-auto{padding-left: 0px;padding-top: 0px;}
.pageTopSize{width: 100%;height: 90%;margin-top: 0px;margin-left: 0px;margin-bottom: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;}
.pageBottomSize{width: 100%;height: 10%;margin-top: 0px;margin-left: 0px;margin-bottom: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;}
.fixed{position: fixed;left: 0px;bottom: 0px;width: 100%;height: 54px;z-index: 9999;background-color:	#F5F5F5;}
.fixedBottom{left: 0px;bottom: 0px;width: 100%;height: 54px;}
a:link{color: #000;}
a:visited{color: #000;}
a:hover {text-decoration: none;}
.viridian{background-color: #3F7F62;}
.turquoise{background-color: #40E0D0;}
.layui-nav .layui-nav-more{border-top-color:#000000;margin-top: -0px;}
.layui-nav .layui-nav-mored{border-color: transparent transparent #000000;margin-top: -5px;}
</style>
</head>
<body>
<div class="container">
  <div class="row">
	<div style="text-align: center; height:70px; line-height:70px;">
	   <a href="/index"><img alt="" src="/img/logo_interface.png" style="height: 40px; display: inline-block; vertical-align: middle;padding:0 1.75rem" /></a>
	</div>
    <div class="col-6" style="line-height: 70px; font-size: 30px;">
    	<ul class="layui-nav" lay-filter="" style="background-color: #F5F5F5; ">
		  <span th:each="menus:${menuAll}">
			  <li class="layui-nav-item" th:each="menu:${menus}" th:if="${menuStat.first}">
			  	<a th:href="${menu.hmenuUrl}" style="font-size: 30px; color: #000000;" th:if="${menu.hmenuOrder}==1">[[${menu.hmenuName}]]</a>
			    <dl class="layui-nav-child" th:if="${menuStat.last}==false and ${menuStat.first}"> <!-- 二级菜单 -->
			      <dd th:each="menu:${menus}"><a th:if="${menu.hmenuOrder}!=1" th:href="${menu.hmenuUrl}" style="height: 30px; line-height: 26px;">[[${menu.hmenuName}]]</a></dd>
			    </dl>
			  </li>
		  </span>
	 </ul>
    </div>
    <div class="col" style="text-align: right; line-height: 70px; font-size: 16px;word-spacing: 16px;">
		<svg width="1em" height="1em" viewBox="0 0 16 16" class="bi bi-search" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
		  <path fill-rule="evenodd" d="M10.442 10.442a1 1 0 0 1 1.415 0l3.85 3.85a1 1 0 0 1-1.414 1.415l-3.85-3.85a1 1 0 0 1 0-1.415z"/>
		  <path fill-rule="evenodd" d="M6.5 12a5.5 5.5 0 1 0 0-11 5.5 5.5 0 0 0 0 11zM13 6.5a6.5 6.5 0 1 1-13 0 6.5 6.5 0 0 1 13 0z"/>
		</svg>
		<span onclick="showImg()">手机APP</span>
		<span th:if="${user}==null">
			<a href="/login">登陆</a>
			<a href="/login/register">
				<button type="button" class="btn btn-primary">注册</button>
			</a>
		</span>
		<span th:if="${user}!=null">
			<span class="btn" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
				<img th:src="@{${user.img}}" style="width: 40px; height: 40px; border-radius: 50%;" alt="头像">
			</span>
			<div class="dropdown-menu">
				<a class="dropdown-item" href="/account/user/index" style="height: 30px; line-height: 30px;" target="_blank">账号中心</a>
				<a class="dropdown-item" href="/account/user/message" style="height: 30px; line-height: 30px;" target="_blank">消息中心</a>
				<a class="dropdown-item" href="/" style="height: 30px; line-height: 30px;">退出登陆</a>
				<a class="dropdown-item" th:if="${user.jurisdiction}==1 and ${user.isactivate==1}" href="/account/user/index"
					style="height: 30px; line-height: 30px;" target="_blank">上传试题</a>
			</div>
		</span>
    </div>
  </div>
</div>


<div class="container" id="containerDiv">
	<div class="row">
		<div class="col-sm-3" style="padding-right: 0px; border: solid  #e2e2e2 2px; border-radius: 5px;" >
	      	<div class="accordion" id="accordionExample">
			  <div class="card" th:each="list : ${message}">
			    <div class="card-header" id="headingOne" th:if="${listStat.index}%2==0">
			      <h2 class="mb-0">
			        <span th:if="${list}!=null" class="btn btn-block text-left" style="color: #007bff;font-size: 17px;" data-toggle="collapse" th:attr="data-target='#collapse'+${listStat.index}/2" aria-expanded="true">
			          	[[${list.cname}]]
			        </span>
			      </h2>
			    </div>
			    <div th:if="${listStat.index}%2!=0 and ${listStat.index}==${count}" th:id="'collapse'+${listStat.index-1}/2" class="collapse show" aria-labelledby="headingOne" data-parent="#accordionExample">
			      <div class="card-body">
			      		<p th:each="data : ${list}" style="color: #007bff;font-size: 13px;" th:attr="onclick='messagetoload('+${data.cpath}+');'" >[[${data.cname}]]</p>
			      </div>
			    </div>
			    <div th:if="${listStat.index}%2!=0 and ${listStat.index}!=${count}" th:id="'collapse'+${listStat.index-1}/2" class="collapse" aria-labelledby="headingOne" data-parent="#accordionExample">
			      <div class="card-body">
			      		<p th:each="data : ${list}" style="color: #007bff;font-size: 13px;" th:attr="onclick='messagetoload('+${data.cpath}+');'">[[${data.cname}]]</p>
			      </div>
			    </div>
			  </div>
			</div>
	    </div>
	    <div class="col-sm-9" style="background-color: #fff;">
	    	<form class="layui-form" lay-filter="">
                <div class="layui-form-item row-12" style="margin: 0 0 0 15px;">
                	<div class="layui-inline layui-col-xs12" id="tid">
                       	<div style="text-align: center;" th:if="${knowledge!=null}">
                       		<h1 id="kmessageKtitle" style="margin-bottom: 0px;">[[${knowledge.ktitle}]]</h1>
                      	  	内容提供者：<span id="knowledgeKaudit">网站管理员</span>&emsp;&emsp;&emsp;
                      	  	提供时间：<span id="knowledgeKtime">[[${knowledge.ktime}]]</span>&emsp;&emsp;&emsp;
                      	  	<span id="knowledgeError1" th:if="${user!=null}" th:attr="name=${knowledge.kid}">内容有误？</span>
                      	  	<span id="knowledgeError2" th:if="${user==null}">内容有误？</span>
                     	</div><hr>
                      	<label class="layui-col-xs12" style="width: 100%;">
                        	<span id="kmessagespan" th:if="${knowledge!=null}">[[${knowledge.kmessage}]]</span>
                      	</label>
                    </div>
                </div>
                </form>
	    </div>
	</div>
</div>
<a id="loginUser" href="/login"></a>
<script type="text/javascript">
$("#knowledgeError2").click(function(){
	$("#loginUser")[0].click();
})
$("#knowledgeError1").click(function(){
	parent.layui.admin.prompt({
        title: '请指出内容出现的问题：',
        formType: 2
    }, function (value, index, elem) {
        parent.layer.close(index);
        let params = {};
        params.id = $("#knowledgeError1").attr('name');
        params.message = value;
        $.ajax( {
   	        url : '/knowledge/user/mistake', 
   	        type : 'post',
   	        data: params,
   	        dataType : 'json',
   	        success : function(data) {
   	        	if(data.code==0){
            		 layer.msg(data.msg,{icon: 1});
	        	 }else{
	        		 layer.msg(data.msg,{icon: 2});
	        	 }
   	        }
   	    });
    });
});
</script>

<script type="text/javascript">
    var div = document.getElementById('containerDiv');
    //alert(div.offsetHeight); // 224
    //alert(div.clientHeight); // 220
    $("#kmessagespan").html($("#kmessagespan").text());
    function messagetoload(cpath){
    	let params = {};
        params.kid = cpath;
        
        $.ajax( {
   	        url : '/knowledge/messagetoload', 
   	        type : 'post',
   	        data: params,
   	        dataType : 'json',
   	        success : function(data) {
   	        	$("#kmessagespan").html(data.kmessage);
   	        	$("#knowledgeError1").attr("name",data.kid);
   	        	$("#kmessageKtitle").html(data.ktitle);
   	        	$("#knowledgeKaudit").html(data.kaudit);
   	        	$("#knowledgeKtime").html(data.ktime);
   	        }
   	    });
    }
</script>

<br>

<div class="container">
	<div class="row">
		<div class="layui-col-xs12">
			<div class="layui-col-xs4" style="padding-right:  15px;">
				<h4>关于我们</h4>
				<hr width="300px">
				<p>&emsp;&emsp;碳氢知识由碳三氢二独立设计完成，网站的服务对象为初三到高三学习化学的学子，为他们在化学的道路上助力。</p>
				<p>&emsp;&emsp;网站宣言：用知识改变生活，前人为后人铺路。</p>
			</div>
			<div class="layui-col-xs4" style="padding: 0 15px;">
				<h4>网站标签</h4>
				<hr width="300px">
				<span class="layui-btn layui-btn-primary layui-btn-sm">初中化学</span>
				<span class="layui-btn layui-btn-primary layui-btn-sm">高中化学</span>
				<span class="layui-btn layui-btn-primary layui-btn-sm">有机化学</span><br><br>
				<span class="layui-btn layui-btn-primary layui-btn-sm">无机化学</span>
				<span class="layui-btn layui-btn-primary layui-btn-sm">知识分享</span>
				<span class="layui-btn layui-btn-primary layui-btn-sm">题目新颖</span><br><br>
				<span class="layui-btn layui-btn-primary layui-btn-sm">学以致用</span>
				<span class="layui-btn layui-btn-primary layui-btn-sm">由浅入深</span>
				<span class="layui-btn layui-btn-primary layui-btn-sm">独立设计</span><br>
			</div>
			<div class="layui-col-xs4" style="padding-left: 15px;">
				<h4>联系方式</h4>
				<hr width="300px">
				<p>联系电话：18996542291</p>
				<p>电子邮箱：tansanqinger@gmail.com</p>
				<p>无论是想加入还是提出已经，都欢迎通过上述方式与我联系。</p>
			</div>
			<div class="layui-col-xs12">
				<hr>
				<span>版权所有&copy;网站一切解释权属于碳氢平台</span>&emsp;&emsp;&emsp;
				<a class="span_bottom" href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=50010102000726">
					<img style="vertical-align: middle;" src="/img/put_on_records.png" width="14px"/>渝公网安备50010102000726号</a>
			</div>
		</div>
		
	</div>
</div>
<a href="/message?name=" id="messageSub"></a>
</body>
<script type="text/javascript">
$(function(){
	let height = window.innerHeight;
	$("#containerDiv").css("min-height",height-410+"px");
});
layui.use('element', function(){
  var element = layui.element;
});
</script>
</html>
